﻿using System;
using Microsoft.Office.PowerPoint.STAMP.Properties;
using Microsoft.Office.PowerPoint.STAMP.View;

namespace Microsoft.Office.PowerPoint.STAMP.Presenter
{
    public class ProgressPresenter : Presenter<IProgressView>
    {
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="view">The view.</param>
        public ProgressPresenter(IProgressView view)
            : base(view)
        {
        }

        public void Update(int progress, string description)
        {
            View.Description = description;
            View.ProgressBarValue = progress;
        }

        public void UpdateDeleting(int progress)
        {
            Update(progress, String.Format(Resources.Progress_Update__Deleting_captions, progress, View.ProgressBarMaximum));
        }

        public void UpdateCreating(int progress)
        {
            Update(progress, String.Format(Resources.Progress_Update_Creating_captions, progress, View.ProgressBarMaximum));
        }
    }
}